/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package caa.struts.faculty.form;

import java.util.ArrayList;
import org.apache.struts.action.ActionForm;
import th.com.entity.BranchEntity;
import th.com.entity.DepartmentEntity;
import th.com.entity.DisplayDTO;
import th.com.entity.FacultyEntity;
import th.com.entity.ProgramEntity;
import th.com.entity.SubjectEntity;

/**
 *
 * @author omega
 */
public class ManageFacultyForm extends ActionForm {

    private String BranchId = "";
    private String BrandName = "";
    private String DepartmentId = "";
    private String DepartmentName = "";
    private String FacultyId = "";
    private String FacultyName = "";
    private String ProgramId = "";
    private String ProgramName = "";
    private String SubjectId = "";
    private String SubjectNameThai = "";
    private String SubjectNameEng = "";
    private String SubjectCreditType = "";
    private String SubjectCredit = "";
    private String SubDescriptionThai = "";
    private String SubjectDescriptionEng = "";
    private String kwKeyWord = "";
    
    private FacultyEntity facultyEntity = new FacultyEntity();
    private ArrayList<FacultyEntity> facultyList = new ArrayList<FacultyEntity>();
    private DepartmentEntity departmentEntity = new DepartmentEntity();
    private ArrayList<DepartmentEntity> departmentList = new ArrayList<DepartmentEntity>();
    private BranchEntity branchEntity = new BranchEntity();
    private ArrayList<BranchEntity> branchList = new ArrayList<BranchEntity>();
    private ProgramEntity programEntity = new ProgramEntity();
    private ArrayList<ProgramEntity> programList = new ArrayList<ProgramEntity>();
    private SubjectEntity subjectEntity = new SubjectEntity();
    private ArrayList<SubjectEntity> subjectList = new ArrayList<SubjectEntity>();
    
    private ArrayList<DisplayDTO> dtoList = new ArrayList<DisplayDTO>();
    private Class knowClass;
    private DisplayDTO dto = new DisplayDTO();
    
    private String mode = "";
    private String id = "";

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMode() {
        return mode;
    }

    public void setMode(String mode) {
        this.mode = mode;
    }
    
    public boolean getEditMode() {
        boolean rs = false;
        if(this.mode.equalsIgnoreCase("edit")) {
            rs = true;
        }
        return rs;
    }

    public DisplayDTO getDto() {
        return dto;
    }

    public void setDto(DisplayDTO dto) {
        this.dto = dto;
    }

    public Class getKnowClass() {
        return knowClass;
    }

    public void setKnowClass(Class knowClass) {
        this.knowClass = knowClass;
    }

    public ArrayList<DisplayDTO> getDtoList() {
        return dtoList;
    }

    public void setDtoList(ArrayList<DisplayDTO> dtoList) {
        this.dtoList = dtoList;
    }

    /**
     * @return the BranchId
     */
    public String getBranchId() {
        return BranchId;
    }

    /**
     * @param BranchId the BranchId to set
     */
    public void setBranchId(String BranchId) {
        this.BranchId = BranchId;
    }

    /**
     * @return the BrandName
     */
    public String getBrandName() {
        return BrandName;
    }

    /**
     * @param BrandName the BrandName to set
     */
    public void setBrandName(String BrandName) {
        this.BrandName = BrandName;
    }

    /**
     * @return the DepartmentId
     */
    public String getDepartmentId() {
        return DepartmentId;
    }

    /**
     * @param DepartmentId the DepartmentId to set
     */
    public void setDepartmentId(String DepartmentId) {
        this.DepartmentId = DepartmentId;
    }

    /**
     * @return the DepartmentName
     */
    public String getDepartmentName() {
        return DepartmentName;
    }

    /**
     * @param DepartmentName the DepartmentName to set
     */
    public void setDepartmentName(String DepartmentName) {
        this.DepartmentName = DepartmentName;
    }

    /**
     * @return the FacultyId
     */
    public String getFacultyId() {
        return FacultyId;
    }

    /**
     * @param FacultyId the FacultyId to set
     */
    public void setFacultyId(String FacultyId) {
        this.FacultyId = FacultyId;
    }

    /**
     * @return the FacultyName
     */
    public String getFacultyName() {
        return FacultyName;
    }

    /**
     * @param FacultyName the FacultyName to set
     */
    public void setFacultyName(String FacultyName) {
        this.FacultyName = FacultyName;
    }

    /**
     * @return the ProgramId
     */
    public String getProgramId() {
        return ProgramId;
    }

    /**
     * @param ProgramId the ProgramId to set
     */
    public void setProgramId(String ProgramId) {
        this.ProgramId = ProgramId;
    }

    /**
     * @return the ProgramName
     */
    public String getProgramName() {
        return ProgramName;
    }

    /**
     * @param ProgramName the ProgramName to set
     */
    public void setProgramName(String ProgramName) {
        this.ProgramName = ProgramName;
    }

    /**
     * @return the SubjectId
     */
    public String getSubjectId() {
        return SubjectId;
    }

    /**
     * @param SubjectId the SubjectId to set
     */
    public void setSubjectId(String SubjectId) {
        this.SubjectId = SubjectId;
    }

    /**
     * @return the SubjectNameThai
     */
    public String getSubjectNameThai() {
        return SubjectNameThai;
    }

    /**
     * @param SubjectNameThai the SubjectNameThai to set
     */
    public void setSubjectNameThai(String SubjectNameThai) {
        this.SubjectNameThai = SubjectNameThai;
    }

    /**
     * @return the SubjectNameEng
     */
    public String getSubjectNameEng() {
        return SubjectNameEng;
    }

    /**
     * @param SubjectNameEng the SubjectNameEng to set
     */
    public void setSubjectNameEng(String SubjectNameEng) {
        this.SubjectNameEng = SubjectNameEng;
    }

    /**
     * @return the SubjectCreditType
     */
    public String getSubjectCreditType() {
        return SubjectCreditType;
    }

    /**
     * @param SubjectCreditType the SubjectCreditType to set
     */
    public void setSubjectCreditType(String SubjectCreditType) {
        this.SubjectCreditType = SubjectCreditType;
    }

    /**
     * @return the SubjectCredit
     */
    public String getSubjectCredit() {
        return SubjectCredit;
    }

    /**
     * @param SubjectCredit the SubjectCredit to set
     */
    public void setSubjectCredit(String SubjectCredit) {
        this.SubjectCredit = SubjectCredit;
    }

    /**
     * @return the SubDescriptionThai
     */
    public String getSubDescriptionThai() {
        return SubDescriptionThai;
    }

    /**
     * @param SubDescriptionThai the SubDescriptionThai to set
     */
    public void setSubDescriptionThai(String SubDescriptionThai) {
        this.SubDescriptionThai = SubDescriptionThai;
    }

    /**
     * @return the SubjectDescriptionEng
     */
    public String getSubjectDescriptionEng() {
        return SubjectDescriptionEng;
    }

    /**
     * @param SubjectDescriptionEng the SubjectDescriptionEng to set
     */
    public void setSubjectDescriptionEng(String SubjectDescriptionEng) {
        this.SubjectDescriptionEng = SubjectDescriptionEng;
    }

    /**
     * @return the kwKeyWord
     */
    public String getKwKeyWord() {
        return kwKeyWord;
    }

    /**
     * @param kwKeyWord the kwKeyWord to set
     */
    public void setKwKeyWord(String kwKeyWord) {
        this.kwKeyWord = kwKeyWord;
    }

    /**
     * @return the facultyEntity
     */
    public FacultyEntity getFacultyEntity() {
        return facultyEntity;
    }

    /**
     * @param facultyEntity the facultyEntity to set
     */
    public void setFacultyEntity(FacultyEntity facultyEntity) {
        this.facultyEntity = facultyEntity;
    }

    /**
     * @return the facultyList
     */
    public ArrayList<FacultyEntity> getFacultyList() {
        return facultyList;
    }

    /**
     * @param facultyList the facultyList to set
     */
    public void setFacultyList(ArrayList<FacultyEntity> facultyList) {
        this.facultyList = facultyList;
    }

    /**
     * @return the departmentEntity
     */
    public DepartmentEntity getDepartmentEntity() {
        return departmentEntity;
    }

    /**
     * @param departmentEntity the departmentEntity to set
     */
    public void setDepartmentEntity(DepartmentEntity departmentEntity) {
        this.departmentEntity = departmentEntity;
    }

    /**
     * @return the departmentList
     */
    public ArrayList<DepartmentEntity> getDepartmentList() {
        return departmentList;
    }

    /**
     * @param departmentList the departmentList to set
     */
    public void setDepartmentList(ArrayList<DepartmentEntity> departmentList) {
        this.departmentList = departmentList;
    }

    /**
     * @return the branchEntity
     */
    public BranchEntity getBranchEntity() {
        return branchEntity;
    }

    /**
     * @param branchEntity the branchEntity to set
     */
    public void setBranchEntity(BranchEntity branchEntity) {
        this.branchEntity = branchEntity;
    }

    /**
     * @return the branchList
     */
    public ArrayList<BranchEntity> getBranchList() {
        return branchList;
    }

    /**
     * @param branchList the branchList to set
     */
    public void setBranchList(ArrayList<BranchEntity> branchList) {
        this.branchList = branchList;
    }

    /**
     * @return the programEntity
     */
    public ProgramEntity getProgramEntity() {
        return programEntity;
    }

    /**
     * @param programEntity the programEntity to set
     */
    public void setProgramEntity(ProgramEntity programEntity) {
        this.programEntity = programEntity;
    }

    /**
     * @return the programList
     */
    public ArrayList<ProgramEntity> getProgramList() {
        return programList;
    }

    /**
     * @param programList the programList to set
     */
    public void setProgramList(ArrayList<ProgramEntity> programList) {
        this.programList = programList;
    }

    /**
     * @return the subjectEntity
     */
    public SubjectEntity getSubjectEntity() {
        return subjectEntity;
    }

    /**
     * @param subjectEntity the subjectEntity to set
     */
    public void setSubjectEntity(SubjectEntity subjectEntity) {
        this.subjectEntity = subjectEntity;
    }

    /**
     * @return the subjectList
     */
    public ArrayList<SubjectEntity> getSubjectList() {
        return subjectList;
    }

    /**
     * @param subjectList the subjectList to set
     */
    public void setSubjectList(ArrayList<SubjectEntity> subjectList) {
        this.subjectList = subjectList;
    }

    public ManageFacultyForm() {
        super();
        // TODO Auto-generated constructor stub
    }
    
//        public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
//        ActionErrors errors = new ActionErrors();
//        if (getName() == null || getName().length() < 1) {
//            errors.add("name", new ActionMessage("error.name.required"));
//            // TODO: add 'error.name.required' key to your resources
//        }
//        return errors;
//    }

}
